package com.ijunfu.spring.di._01_bean_autowire.config;

import com.ijunfu.spring.di._01_bean_autowire.service.UserService;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 *
 * @Title  : 
 * @Author : ijunfu <ijunfu@163.com>
 * @Date   : 2023/11/10 17:42
 * @Version: 1.0
 * @Motto  : 世界很大 世界很小
 *
 */
@Configuration
public class AppConfig {

    @Bean(autowire = Autowire.BY_NAME)	// 也可以使用    Autowire.BY_TYPE
    public UserService userService() {
        return new UserService();
    }
}
